Forms: keep Form Responses admin bar link visible on mobile#50421
Conversation
WordPress core hides all non-allowlisted top-level admin bar items below 782px, dropping the custom jetpack-forms quick link. Re-show it and size the icon to match the native mobile items (52px box, centered 28px glyph). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 1 file.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
The Form Responses SVG fills with currentColor. Core dims its own mobile admin bar icons to rgba(240,246,252,0.6) via selectors keyed to core node IDs, which never match our custom node, so ours rendered brighter and stood out. Set the same color on our item inside the existing mobile media query. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Done — set Generated by Claude. |
The icon SVG fills with currentColor and inherited the item's full-brightness text color (#f0f0f1), so it rendered brighter than the native admin bar icons on desktop too -- core dims those to rgba(240,246,252,0.6) at every width, not only on mobile. Verified live: our icon computed to rgb(240,240,241) vs the native rgba(240,246,252,0.6). Fade the icon to 0.6 opacity to match, and restore full opacity on hover/focus. Using opacity rather than a hardcoded color keeps the hover state tracking the user's admin color scheme accent, as the native icons do. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Follow-up: turned out the icon was also brighter than the native ones on desktop, not just mobile — core dims its icons to Reworked it to fade the icon to Generated by Claude. |
The opacity:0.6 fix compounded on mobile: at <=782px core already dims the item's text color to rgba(240,246,252,0.6), which the SVG inherits via currentColor, so applying opacity:0.6 on top made it ~0.36 -- visibly dimmer than the native icons. Reset opacity to 1 inside the mobile block; the desktop fade still applies where core only dims its ::before glyphs. Verified live at both breakpoints: icon now computes to an effective rgba(240,246,252,0.6) and blends with its neighbors on mobile and desktop. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Correction to my note above: the opacity change actually double-dimmed the icon on mobile. At ≤782px core already dims the item's text color to Fixed by resetting Generated by Claude. |

Fixes DSGCOM-595
Proposed changes
admin-bar.csshides every top-level admin bar item below 782px and only re-shows a hardcoded allowlist of core node IDs; the customjetpack-formsnode was never on that list.<style>alongside the node that re-shows#wp-admin-bar-jetpack-formson mobile. The selector carries two IDs, so it beats core's single-ID hiding rule on specificity (no!importantneeded for the un-hide)..ab-iconoverrides use!importantbecause the SVG carries its desktop sizing in an inlinestyleattribute, which otherwise wins the cascade.@media (max-width: 782px).Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
edit_pages.